<div class="form">
    <?php
    $formConfig['htmlOptions']['class'] = 'form-horizontal';
    $formConfig['htmlOptions']['role'] = 'form';
    ?> 

    <?php $form = $this->beginWidget('ActiveForm', $formConfig); ?>

    <?php
    echo $form->alert(array($news, $content), array(
        'errorMessageHtmlOptions' => array('class' => 'alert alert-danger'),
        'flashHtmlOptions' => array('class' => 'alert alert-'),
    ));
    ?>

    <?php if (!$news->isNewRecord): ?>
        <div class="form-group">
            <?php echo $form->labelEx($news, 'id_', array('class' => 'col-sm-2 control-label')); ?>
            <div class="col-sm-2">
                <div class="form-control-static">
                    <?php echo $news->id; ?>
                </div>
            </div>
        </div>
    <?php endif; ?>

    <div class="form-group">
        <?php echo $form->labelEx($news, 'postedDate_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
            <?php $form->dateSelector($news, 'postedDate_', array('class' => 'form-control')); ?>
        </div>
        <?php //echo $form->error($news, 'postedDate_'); ?>
        
        
        <?php echo $form->labelEx($news, 'status_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
            <?php echo $form->dropDownList($news, 'status_', $news->statusOption, array('class' => 'form-control')); ?>
        </div>
        <?php //echo $form->error($news, 'status_'); ?>
    </div>    

    <div class="form-group">
        <?php echo $form->labelEx($content, 'title_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-5">
            <?php echo $form->textField($content, 'title_', array('class' => 'form-control')); ?>
        </div>
        <?php //echo $form->error($content, 'title_'); ?>
    </div>

    <div class="form-group">
        <?php echo $form->labelEx($content, 'description_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-5">
            <?php echo $form->textArea($content, 'description_', array('class' => 'form-control')); ?>
        </div>
        <?php //echo $form->error($content, 'description_'); ?>
    </div>
    
    <div class="form-group">
        <?php echo $form->labelEx($content, 'content_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-5">
            <?php echo $form->editorTextArea($content, 'content_', array('class' => 'form-control')); ?>
        </div>
        <?php //echo $form->error($content, 'content_'); ?>
    </div>

    <hr />

    <div class="form-group">
        <?php echo $form->labelEx($content, 'sefUrl_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-5">
            <?php echo $form->textField($content, 'sefUrl_', array('rows' => 6, 'cols' => 50, 'class' => 'form-control')); ?>
        </div>
        <?php //echo $form->error($content, 'sefUrl_'); ?>
    </div>

    <div class="form-group">
        <?php echo $form->labelEx($content, 'metaTitle_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-5">
            <?php echo $form->textField($content, 'metaTitle_', array('rows' => 6, 'cols' => 50, 'class' => 'form-control')); ?>
        </div>
        <?php //echo $form->error($content, 'metaTitle_'); ?>
    </div>

    <div class="form-group">
        <?php echo $form->labelEx($content, 'metaDescription_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-5">
            <?php echo $form->textArea($content, 'metaDescription_', array('rows' => 6, 'cols' => 50, 'class' => 'form-control')); ?>
        </div>
        <?php //echo $form->error($content, 'metaDescription_'); ?>
    </div>

    <div class="form-group">
        <?php echo $form->labelEx($content, 'metaKeywords_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-5">
            <?php echo $form->textField($content, 'metaKeywords_', array('rows' => 6, 'cols' => 50, 'class' => 'form-control')); ?>
        </div>
        <?php //echo $form->error($content, 'metaKeywords_'); ?>
    </div>

    <hr />

    <div class="form-group">
        <?php echo $form->labelEx($news, 'image_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
            <?php echo $form->multiImageUpload($news, 'image_'); ?>
        </div>
        <?php //echo $form->error($news, 'image_'); ?>
    </div>

    <div class="form-group">
        <?php
        $form->galleryEditor($news, 'imageEditor_', array(
            'imageTemplate'=>'<div>{image}</div><div>{id}, {captionInput} {control}<br />{fileName}<br />{type}, {size}, {totalView}</div>',
            'captionOptions'=>array('maxLength'=>100),
            'class'=>'image-editor',
        ));
        ?>
    </div>

    <hr />
    
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-6">
            <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-floppy-save"></span> <?php echo $news->isNewRecord ? Lang::t('news.create.btn.submit') : Lang::t('news.update.btn.submit'); ?></button>
            <a href="<?php echo $this->homeUrl; ?>" class="btn btn-default"><span class="glyphicon glyphicon-floppy-remove"></span> <?php echo Lang::t('news.create.btn.cancel'); ?></a>
        </div>
    </div>
    
    <?php $this->endWidget(); ?>

</div><!-- form -->